<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>天众供应链云仓储管理系统</title>
	<include file="Public/header" />
</head>
<body>
<script type="text/javascript">
	var getarrivalUrl="{:U('Order/get_arrival')}";//到货商品列表
	var ungroundingUrl="{:U('Stock/ungrounding')}";//下架
	var confirmGroundingUrl="{:U('Stock/confirm_grounding')}";//确认上架
	var get_storagehistoryinfo="{:U('Stock/get_storagehistoryinfo')}";//历史库位列表
	var groundingpushUrl="{:U('Pushsendapi/grounding')}";//推送
	<!-- using('../../../default/js/grounding.js'); -->
</script>
<script type="text/javascript" src="__PUBLIC__/default/js/grounding.js?v=2"></script>
	<table id="groundingDatagrid" toolbar="#grounding_tb"></table>
    <!-- 搜索栏 -->
    <div id="grounding_tb">
        <form id="groundingSearchForm" method="post" novalidate>
             <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon icon-all" plain="true" onclick="groundingObj.showAll()">全部</a>
			<select class="easyui-combobox grounding_status"  style="width:70px;height:30px;">
				<option value="0">未上架</option>
				<option value="1">已上架</option>
			</select>			 
            单号:<input class="easyui-textbox" name="order_no" style="width:150px;height:30px;"> 
			账册编码:<input class="easyui-textbox" name="manual_id" style="width:150px;height:30px;"> 
			商品编码:<input class="easyui-textbox" name="goods_no" style="width:150px;height:30px;"> 
			商品名称:<input class="easyui-textbox" name="goods_name" style="width:150px;height:30px;"> 
			
			云仓商品: 
			<select class="easyui-combobox cloud_depot_status"  style="width:70px;height:30px;">
				<option value="0">未选择</option>
				<option value="1">是</option>
				<option value="2">否</option>
			</select>
			时间: <input class="easyui-datetimebox" name="start_time" value="{:date('Y-m-1 h:i:s',time())}" style="height:30px;width:150px;">
			- <input class="easyui-datetimebox" name="end_time" value="{:date('Y-m-d h:i:s',time())}" style="height:30px;width:150px;">
			时间类型: 
			<select class="easyui-combobox" name="time_cate" style="width:150px;height:30px;">
				<option value="0">未选择</option>
				<option value="1">到货时间</option>
				<option value="2">预计到货时间</option>
				<option value="3">审核时间</option>
				<option value="4">推送实收时间</option>
			</select>
			库位
			<select class="easyui-combobox" name="search_storage_code" style="width:150px;height:30px;">
				<option value="0">未选择</option>
				<volist name="storage_list" id="vo">
					<option value="{$vo['storage_code']}">{$vo['name']}</option>
				</volist>
			</select>
			<a href="#" class="easyui-linkbutton searchBar" iconCls="icon-search" style="height:30px;">搜索</a>
        </form>
        <a href="javascript:void(0)" onclick="groundingObj.groundingBar()" class="easyui-linkbutton" data-options="iconCls:'icon-cart_add',plain:true">上架</a>
		<a href="javascript:void(0)" onclick="groundingObj.ungroundingBar()" class="easyui-linkbutton" data-options="iconCls:'icon-cart_delete',plain:true">批量下架</a>
		<a href="javascript:void(0)" onclick="groundingObj.pushBar()" class="easyui-linkbutton" data-options="iconCls:'icon-world_go',plain:true">推送上架数据</a>
		<a href="javascript:void(0)" onclick="groundingObj.reloadBar()" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true">刷新</a>
		<a href="javascript:void(0)" onclick="groundingObj.saveBar()" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true">保存</a>
		<a href="javascript:void(0)" class="easyui-linkbutton excelOut" iconCls="l-btn-icon icon-page_excel" plain="true" >导出EXCEL</a>
    </div>
    <!-- /搜索栏 -->
	<!-- 上架 -->
    <div id="groundingEditDialog" class="easyui-dialog" style="width:400px;padding:10px 20px"
            closed="true" buttons="#groundingEditButtons"  modal="true">
        <form id="groundingEditForm" method="post" novalidate>       
			<div class="fitem">
                <label>单号</label>
                <input name="id" type="hidden" />
                <input name="order_no" class="easyui-textbox" data-options="disabled:true,height:30,editor:'numberbox'" />
            </div>
			<div class="fitem">
                <label>账册编号</label>
                <input name="id" type="hidden" />
                <input name="manual_id" class="easyui-textbox" data-options="disabled:true,height:30,editor:'numberbox'" />
            </div>			
            <div class="fitem">
                <label>商品编码</label>
                <input name="id" type="hidden" />
                <input name="goods_no" class="easyui-textbox" data-options="disabled:true,height:30,editor:'numberbox'" />
            </div>
            <div class="fitem">
                <label>商品名称</label>
                <input name="goods_name" class="easyui-textbox" data-options="disabled:true,height:30" />
            </div>
			<!-- <div class="fitem" > -->
                <!-- <label>条形码</label> -->
                <!-- <input name="bar_code" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[2,30]']" /> -->
            <!-- </div> -->
			<div class="fitem">
                <label>规格</label>
                <input name="goods_spec" class="easyui-textbox" data-options="disabled:true,height:30" />
            </div>
			<div class="fitem">
                <label>库位</label>
                <select class="easyui-combobox" name="storage_code" id='groundingGroupEdit' data-options="height:30,width:165,required:true,editable:false,panelHeight:'300px',validType:['length[2,30]','selected[]']">
                        <option value="0">未选择</option>
						<volist name="storage_list" id="vo">
							<option value="{$vo['storage_code']}">{$vo['name']}</option>
						</volist>
                </select>
            </div>
			<div class="fitem">
                <label>面积</label>
                <input name="area" class="easyui-textbox" data-options="required:true,height:30" />
            </div>
			<div class="fitem">
                <label>到货时间</label>
                <input name="t_arrival_time" class="easyui-datetimebox" data-options="required:true,height:30" />
            </div>
			<div class="fitem">
                <label>过期时间</label>
                <input name="overdue_time" class="easyui-datetimebox" data-options="required:true,height:30" />
            </div>
			<div class="fitem">
                <label>单价</label>
                <input name="price" class="easyui-textbox" data-options="disabled:true,height:30" />
            </div>
			<div class="fitem">
                <label>实际到货数量</label>
                <input name="receive_amount" class="easyui-textbox" data-options="disabled:true,height:30" />
            </div>
			<div class="fitem">
                <label>合格品</label>
                <input name="conforming_p" class="easyui-textbox" data-options="disabled:false,height:30" />
            </div>
			<div class="fitem">
                <label>残次品</label>
                <input name="nonconforming_p" class="easyui-textbox" data-options="disabled:false,height:30" />
            </div>
			<div class="fitem">
                <label>报废品</label>
                <input name="scrap_one" class="easyui-textbox" data-options="disabled:false,height:30" />
            </div>
                
        </form>
    </div>
    <div id="groundingEditButtons">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="groundingObj.save('{:U('Stock/confirm_grounding')}')" style="width:90px">上架</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:
    $('#groundingEditDialog').dialog('close')" style="width:90px">取消</a>
    </div>
    <!-- /上架 -->   
</body>